#ifndef _SHAPE_FACTORY_H_
#define _SHAPE_FACTORY_H_

#include <iostream>
#include <memory>

//形状类
class Shape{
public:
    virtual void draw()=0;
};

class Circle:public Shape{
public:
    void draw() override;
};

class Rectangle:public Shape{
public:
    void draw() override;
};

//简单工厂类
class ShapeFactory{
public:
    enum Type{CIRCLE, RECTANGLE};
    static std::unique_ptr<Shape> createShape(Type type);
};


#endif